AMD IOMMU: make interrupt work again
authorJan Beulich <jbeulich@suse.com>
Mon, 17 Jun 2013 08:30:57 +0000 (10:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 17 Jun 2013 08:30:57 +0000 (10:30 +0200)
commit7a89f62dddee14808a865b88c7bbe2b6da8701e0
tree2faa6e9a7c6b298c569d8cda461b54aa6651ae95
parentb03165b4edf7fe2a441844e11bd2cba0653281f9
AMD IOMMU: make interrupt work again

Commit 899110e3 ("AMD IOMMU: include IOMMU interrupt information in 'M'
debug key output") made the AMD IOMMU MSI setup code use more of the
generic MSI setup code (as other than for VT-d this is an ordinary MSI-
capable PCI device), but failed to notice that till now interrupt setup
there _required_ the subsequent affinity setup to be done, as that was
the only point where the MSI message would get written. The generic MSI
affinity setting routine, however, does only an incremental change,
i.e. relies on this setup to have been done before.

In order to not make the code even more clumsy, introduce a new low
level helper routine __setup_msi_irq(), thus eliminating the need for
the AMD IOMMU code to directly fiddle with the IRQ descriptor.

Reported-by: Suravee Suthikulanit <suravee.suthikulpanit@amd.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Tested-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Acked-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
xen/arch/x86/msi.c
xen/drivers/passthrough/amd/iommu_init.c
xen/include/asm-x86/msi.h